package com.shuqing.download;

import com.shuqing.download.engine.DownLoadEngine;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * @author wangshuqing
 */
@EnableScheduling
@EnableAsync
@SpringBootApplication
public class DownloadCenterDemoApplication implements ApplicationRunner {

    public static void main(String[] args) {
        SpringApplication.run(DownloadCenterDemoApplication.class, args);
    }

    @Autowired
    private DownLoadEngine engine;
    @Override
    public void run(ApplicationArguments args) throws Exception {
        engine.start();
    }
}
